/**
 * @author David
 */

 function diagnosticarEnfermedades(url_diagnosticar, id)
 {
 	
   //alert(url_diagnosticar);
   //alert(id);
   var sintomas =document.getElementById("diagnostico_sintomas_list");
   var selectedSintomas = new Array();
   var count = 0;
   var query_string =''
   for (i=0; i<sintomas.options.length; i++) 
   {
     if (sintomas.options[i].selected) 
     {
       selectedSintomas[count] = sintomas.options[i].value;
       query_string += "&prog[]=" + sintomas.options[i].value; 
       count++;
     }
   }
   //alert(selectedSintomas);
      
   jQuery.ajax({
      url: url_diagnosticar,
      type: "POST",
      cache: false,
      
      data: "id="+id+query_string,//({id: id, data_1 : selectedSintomas}),
      dataType: "html",
      beforeSend: function (XMLHttpRequest) {
      	         //alert('bedore send');
                        // document.getElementById('btnDiagnosticar').style.display = 'none';
                  },
      success: function(msg){
               //if (MSG[0] == 'KO')
               document.getElementById('resultado').innerHTML = msg;
      	       //alert(msg);
              // var MSG = msg.split('|');
                  // ajaxSaveOrder(url_update, orderId,  trackingNumber, shippingDate, takeAccount);
                 
               }
             }
         );
   	
 }